# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-altair
_pkgname=altair
pkgver=5.5.0
pkgrel=1
pkgdesc='A declarative statistical visualization library for Python.'
arch=('any')
url='https://pypi.org/project/altair/#files'
license=('BSD')
depends=('python' 'python-typing_extensions' 'python-numpy' 'python-jinja'
         'python-pandas' 'python-jsonschema' 'python-packaging' 'python-toolz')
makedepends=('python-build' 'python-pip')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('24a195f83113a83de30b6cca45074116d4f386effa42f129a4949ad83e2b5aa1746e50f48d84edaf292bd2ea8e529d9823758469727d690bd946582f5d093ada')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

